#ifndef GLB_DEFS_H__
#define GLB_DEFS_H__

#define BOOST_ALL_NO_LIB

#define  _MEM_LEAK

#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <iomanip>

//#define CRTDBG_MAP_ALLOC    
//#include <stdlib.h>    
//#include <crtdbg.h> 

#include <boost/filesystem.hpp>

#ifdef _DEBUG
#ifdef _MEM_LEAK

//#include <vld.h>

#endif
#endif

namespace bf = boost::filesystem;

extern const int Error_Sqlite_Operate_Fail;
extern const int Error_LevelDB_Operate_Fail;
extern const int Error_Protobuf_Parse_Fail;
extern const int Error_LoadProto_Fail;
extern const int Error_Input_Invalid;
extern const int Error_Exe_Position;
extern const int Error_Create_Dir;


extern std::map<std::string, std::string> Msg2DBNameMap;
extern std::map<std::string, std::string> Option2MsgMap;

void LoadGlbData();
int MsgName2Proto(const std::string &strMsgName, std::string &strProtoFile);
int getOutputDir(const std::string &strMsgName, std::string &strOutputDir);
int ParseCmdLine(int argc, char* argv[], std::string &strMsgName);

#endif
